15. Quiz: LIMIT

Can You Use LIMIT?

  1. Try using LIMIT yourself below by writing a query that displays all the data in the occurred_at, account_id, and channel columns of the web_events table, and limits the output to only the first 15 rows.

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity, so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: sql-evaluator
  • Opened files (when workspace is loaded): n/a

Using a Separate Text Editor to Write SQL Queries and Save Your Notes

You might want to use a separate text editor to write SQL queries, and make notes on what they are used for. I copy and paste my SQL queries back and forth between the classroom and the Atom text editor, which you can download free here if you'd like.

You can use any method or text editor for writing your queries and keeping your own notes. Notepad and Word are other options. The screenshot below shows what my file looks like in Atom.

I save my SQL query files in Atom with a .sql extension to get highlighting support with SQL syntax.

All of this is optional for you though. You can do all of your work in the Udacity classroom if you like, but using a separate text editor is a way to save your notes and look back at them later.

Course Flow

A few notes about the course flow from this point. As you are introduced to new SQL functionality, we will prompt you to practice writing queries on your own.

You will usually watch Derek answer a business question with a new SQL command. Then we'll ask you a few questions to practice use the same functionality. For each question, a solution is provided on the following page, so that you can check your answer.

You can usually see this structure in the concept names: Video shows Derek performing the query, Quiz provides questions and a workspace for you to practice, and Solutions provides the solutions for the quiz questions.